﻿namespace EaseDapper.MySqlTest
{
    public class DataClient
    {
        private static DataManagerClient _client;
        private static readonly object obj_locker = new();

        public static DataManagerClient Instance
        {
            get
            {
                if (_client is null)
                {
                    lock (obj_locker)
                    {
                        ConnectConfig config = new()
                        {
                            DbType = "MySQL",
                            ConnectString = "Database=hypermanganate_database;Data Source=localhost;User Id=root;Password=root123456;CharSet=utf8;port=3306;SslMode=none;"
                        };
                        _client = new DataManagerClient(config);
                    }
                }
                return _client;
            }
        }
    }
}
